package com.it.myobjectstream;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class ObjectStreamDemo1 {
    public static void main(String[] args) throws IOException {
        //序列化流
        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("D:\\java\\basic-code\\myio\\src\\c.txt"));
        oos.writeObject(new Student("张三",23,"男"));
        oos.close();
    }
}
